<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>工资组成表</title>
 <link href="css/table.css" rel="stylesheet" type="text/css">
 <link href="css/button.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="js/delete.js"></script>
</head>
<body>
<section><a href="logout">注销</a>&nbsp;&nbsp;您现在的位置：<a href="admin.jsp">首页</a>
&gt;&gt;工资管理</section>
<table class="altrowstable" id="alternatecolor" style="margin:auto">
<caption>工资管理</caption>
	<tr>
		<th>部门名称</th>
		<th>岗位</th>
		<th>基本工资</th>
		<th>岗位津贴</th>
		<th>午餐补贴</th>
		<th>迟到、请假扣钱/天</th>
		<th>加班工资/天</th>
		<th>操作</th>
	</tr>
	<c:forEach items="${list}" var="salary">
		<tr>
			<td>${salary.departmentName}</td>
			<td>${salary.post}</td>
			<td>${salary.baseWage}</td>
			<td>${salary.allowance}</td>
			<td>${salary.lunch}</td>
			<td>${salary.otherPay}</td>
			<td>${salary.overtimeWage}</td>
			<td>
				<a href="/salary_manage/salary?method=delete&id=${salary.id}"onclick="javascript:return todel()">删除</a>
				<a href="/salary_manage/salary?method=findById&id=${salary.id}">修改</a>
				<%--修改分为2步：先根据id在servlet中找到那个学生，找到后把此学生的信息传到update.jsp页面--%> 
			</td>
		</tr>
	</c:forEach>
</table>
<div class="demo_con">
<button type="button" class="button blue rarrow" onclick="window.location.href = '/salary_manage/salary?method=add'">添加部门</button>
<br/>
<button type="button" class="button blue larrow" onclick="window.location.href = 'admin.jsp'">返回首页</button>
</div>
</body>
</html>